package actions.staffs;

import actions.base.BaseAction;

public class DeleteMulti extends BaseAction {
	
	int[] staffs;
	
	@Override
	public String execute() throws Exception {
		String ids = "";
		for (int i = 0; i < staffs.length; i++) {
			ids += staffs[i] + ",";
		}
		ids = ids.substring(0, ids.length() - 1);
		if(services.deleteMultiStaffByIds(ids) > 0)
			return redirect("Listing.action");
		return ERROR;
	}

	/**
	 * @return the staffs
	 */
	public int[] getStaffs() {
		return staffs;
	}

	/**
	 * @param staffs the staffs to set
	 */
	public void setStaffs(int[] staffs) {
		this.staffs = staffs;
	}
	
}
